/**
 * 作者：陈文斌 on 2019/1/18.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'package:crm/model/Company/company_request_model.dart';
import 'package:crm/model/Company/company_info_model.dart';
import 'package:crm/model/Employee/employee_model.dart';
import 'package:crm/model/Employee/employee_Invite_model.dart';

part 'member_model.g.dart';

@JsonSerializable()
class MemberModel extends Object with _$MemberModelSerializerMixin {
  String Id;
  String AppId;
  String UserName;
  String NickName;
  String RealName;
  bool Gender;
  String PortraitUrl;
  String VisualizationImgUrl;
  String Email;
  String EmailImgEncodedData;
  bool EmailConfirmed;
  String PhoneRegionCode;
  String PhoneNumber;
  String PhoneNumberImgEncodedData;
  bool PhoneNumberConfirmed;
  String Birthday;
  String LastLoginDeviceCode;
  String UseLang;
  String ResidentCountry;
  String ResidentProvince;
  String ResidentCity;
  String ResidentArea;
  String HometownCountry;
  String HometownProvince;
  String HometownArea;
  String Address;
  List<CompanyRequestModel> CompanyRequests;
  List<CompanyInfoModel> Companies;
  List<EmployeeModel> Identities;
  List<String> IdentityIds;
  List<EmployeeInviteModel> EmployeeInvites;

  MemberModel(
    this.Id,
    this.AppId,
    this.UserName,
    this.NickName,
    this.RealName,
    this.Gender,
    this.PortraitUrl,
    this.VisualizationImgUrl,
    this.Email,
    this.EmailImgEncodedData,
    this.EmailConfirmed,
    this.PhoneRegionCode,
    this.PhoneNumber,
    this.PhoneNumberImgEncodedData,
    this.PhoneNumberConfirmed,
    this.Birthday,
    this.LastLoginDeviceCode,
    this.UseLang,
    this.ResidentCountry,
    this.ResidentProvince,
    this.ResidentCity,
    this.ResidentArea,
    this.HometownCountry,
    this.HometownProvince,
    this.HometownArea,
    this.Address,
    this.CompanyRequests,
    this.Companies,
    this.Identities,
    this.IdentityIds,
    this.EmployeeInvites,
  );

  @override
  factory MemberModel.fromJson(Map<String, dynamic> json) => _$MemberModelFromJson(json);
}
